<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="../../static/css/bootstrap.min.css" rel="stylesheet" th:href="@{/static/css/bootstrap.min.css}">
    <link href="../../static/css/dashboard.css" rel="stylesheet" th:href="@{/static/css/dashboard.css}">
</head>
<body>
<div th:insert="student/common::topbar"></div>
<div class="container-fluid">
    <div class="row">
        <div th:insert="~{student/common::sidebar(active='classCourseList.html')}"></div>
        <main class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4" role="main">
            <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pb-2 mb-3 border-bottom">
                <h3 th:text="${classInfo.getClass_name()+date.getWeek()+'的课程表'}"></h3>
                <div class="btn-toolbar mb-2 mb-md-0">
                    <div class="btn-group mr-2">
                        <form id="form" method="post" th:action="@{/student/toShowClassCourseList}">
                            <!--onblur 失去焦点产生事件-->
                            <div class="input-group">
                                <select class="form-control" id="day_id" name="day_id">
                                    <option th:each="day:${weekList}" th:selected="${date.getDay_id()==day.getDay_id()}"
                                            th:text="${day.getWeek()}" th:value="${day.getDay_id()}">
                                    </option>
                                </select>
                                <select class="form-control input-group-addon " hidden id="class_name"
                                        name="class_name">
                                    <option th:each="info:${classInfoList}"
                                            th:selected="${classInfo.getClassid()==info.getClassid()}"
                                            th:text="${info.getClass_name()}"
                                            th:value="${info.getClass_name()}"></option>
                                </select>
                                <input class="input-group-addon btn btn-sm btn-primary" type="submit" value="搜索">
                            </div>
                        </form>
                    </div>
                    <div class="btn-group mr-2">
                        <button class="btn btn-primary btn-sm btn-outline-secondary" id="btn-admin">管理员</button>
                        <button class="btn btn-sm btn-outline-secondary" id="btn-student">学生端</button>
                    </div>
                </div>
            </div>
            <div class="table-responsive">
                <table class="table table-striped table-sm">
                    <thead style="background-color: #00d0ff">
                    <tr>
                        <th style="color: #de00f7">上午/下午</th>
                        <th style="color: #AB9C08">时间</th>
                        <th style="color: #067D14">课程顺序</th>
                        <th style="color: #00f729">课程</th>
                        <th style="color: #AB9C08">老师</th>
                        <th style="color: #023dff">课程类型</th>
                        <th style="color: #067D14">选修/必修</th>
                        <th style="color: #0281ff">教室</th>
                        <!-- <th style="color: #899443">操作</th>-->
                        <!--<th>年级</th>-->
                    </tr>
                    </thead>
                    <tbody>
                    <tr class="courseList" th:each="course:${courseInfoList}">
                        <th style="color: #de00f7" th:text="${course.getTime_type()}"></th>
                        <th style="color: #AB9C08" th:text="${course.getTime()}"></th>
                        <th style="color: #067D14" th:text="${course.getLesson()}"></th>
                        <th th:style="${course.getTid()==null?'color: #F7001E':'color: #00f729'}"
                            th:text="${course.getTid()==null?'未安排':course.getSubject()}"></th>
                        <th th:style="${course.getTid()==null?'color: #F7001E':'color: #AB9C08'}"
                            th:text="${course.getTid()==null?'未安排':course.getTname()}"></th>
                        <th th:style="${course.getTid()==null?'color: #F7001E':'color: #023dff'}"
                            th:text="${course.getTid()==null?'未安排':course.getCourse_type()}"></th>
                        <th th:style="${course.getTid()==null?'color: #F7001E':'color: #00f77c'}"
                            th:text="${course.getTid()==null?'未安排':course.getClasses()}"></th>
                        <th style="color: #0281ff" th:text="${course.getClassroom()}"></th>
                        <!-- <th>
                             <button th:value="${course.getLesson_id()}" style="color: #899443" class="btn btn-sm  btn-outline-secondary " >安排课程</button>

                         </th>-->
                    </tr>
                    </tbody>
                </table>
            </div>
        </main>
    </div>
</div>
<script src="../../static/js/jquery-3.6.0.min.js" th:src="@{/static/js/jquery-3.6.0.min.js}"
        type="text/javascript"></script>
<script src="../../static/js/bootstrap.min.js" th:src="@{/static/js/bootstrap.min.js}" type="text/javascript"></script>
<script src="../../static/js/btn.js" th:src="@{/static/js/btn.js}"></script>
</body>
</html>